**Figure 4: Gender Gaps by year in total score**

clear all 
use Clean_data, clear


gen femalexcomp= female * inv_competNOQUOTA

qui reg z_total_points female femalexcomp z_GPA i.year  if degree=="M" & test==1 & GPA!=. & foreign==0 , robust 

frame create z_total_points_t4 year or orlb orub Pval
forvalues j=1983/2019{
if inlist(`j',1987,1988) continue
sum inv_competNOQUOTA if year==`j' & degree=="M"  & z_GPA!=. & foreign==0
scalar Pval`j'=r(mean)
lincom _b[female]+ _b[femalexcomp]*Pval`j' 
frame post z_total_points_t4 (`j') (`r(estimate)') (`r(lb)') (`r(ub)') (Pval`j')
 }
 
frame change z_total_points_t4
isid year, sort
format or %3.2f
format orlb %3.2f
format orub %3.2f
list, noobs clean

twoway (rarea orlb orub year,fcolor(gs6%50) fintensity(inten50) lwidth(none)) ///
 	(line or year, lcolor(black) lwidth(medthick)), ///
    graphregion(fcolor(white) lcolor(white)) ylab(,nogrid) ///
  ytitle(" Total Score") xtitle(" ",size(small)) ///
    xlabel(1983(6)2019, labsize(small)) yline(0, lcolor(grey) lpattern(shortdash)) legend(off)
	
